package grammar.perspective;

import grammar.GrammarRepository;

import java.sql.SQLException;

import DTO.Grammar;

public class GrammarRegister {
	private GrammarRepository grammarRepository;
	
	public GrammarRegister(GrammarRepository grammarRepository){
		this.grammarRepository = grammarRepository;
	}
	
	public Grammar getGrammar() throws SQLException, CanNotLoadGrammarOnScreenException{
		return grammarRepository.getGrammar();
	}
	
	public void setGrammar(Grammar grammar) throws SQLException, GrammarNotExistException, GrammarHasNotSyntaxAssociatedException{
		grammarRepository.setGrammar(grammar);
	}
}
